﻿using Bll;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace WebApiServer.Controllers
{
    public class CarController : ApiController
    {
        CarBLL bll = new CarBLL();

        #region 查询购物车
        public List<Car> GetSelCar(int UserID)
        {
            return bll.SelCar(UserID);
        }
        #endregion

        #region 添加购物车
        public int GetInsertOrder(int id)
        {
            return bll.InsertOrder(id);
        }
        #endregion

        #region 删除购物车
        public int GetDelCar(int CarId)
        {
            return bll.DelCar(CarId);
        }
        #endregion

        #region 修改购物增加数量
        public int GetAddUpdate(int CarId)
        {
            return bll.AddUpdate(CarId);
        }
        #endregion

        #region 修改购物减少数量
        public int GetJianUpdate(int CarId)
        {
            return bll.JianUpdate(CarId);
        }
        #endregion

    }
}
